clear all; close all;

SV_ID = 12;
samples = Samples('E5a',...
									'/home/ondrej/wnav/snapshots/snapshot_mem_05_e5a.dat');
E5aI_sc = SecondaryPRNCode('E5aI');
NumberOfSamples = floor(E5aI_sc.ChipPeriod/samples.SamplingPeriod);
NumberOfPeriods = 20;
E5aI_pc = PrimaryPRNCode('E5aI', NumberOfSamples, 1); 
E5aQ_pc = PrimaryPRNCode('E5aQ', NumberOfSamples, 1); 
samples.loadSamples(NumberOfSamples*(NumberOfPeriods+1));
acq = Acquisition('E5a', samples.FrequencyOffset);
acq.Acquire(samples, NumberOfPeriods, 1e-5, SV_ID, E5aI_pc, E5aQ_pc);
plot(abs(acq.CCF));

